﻿using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;
using System.Windows.Forms;

namespace HR60_PanelSoft.View.Controls
{
	// 分割线控件，竟然没有原生的-_-
	public class DivLine : Label
	{
		public DivLine()
		{
			this.BorderStyle = BorderStyle.Fixed3D;
			this.AutoSize = false;
			this.Height = 2;
			this.Text = "";
			this.Margin = new Padding(0, 10, 0, 10);
			this.ParentChanged += new EventHandler(FormLine_ParentChanged);
		}

		void FormLine_ParentChanged(object sender, EventArgs e)
		{
			this.Width = Parent.Width;
			this.Parent.SizeChanged += new EventHandler(Parent_SizeChanged);
		}

		void Parent_SizeChanged(object sender, EventArgs e)
		{
			this.Width = Parent.Width;
		}
	}
}
